enum {
	A_READ,
	A_WRITE
};

struct adev;

struct adev	*ad_open(const char *, int);
struct adev	*ad_fpopen(FILE *, int);
void		 ad_close(struct adev *);
int		 ad_get(struct adev *, const char *, ...);
int		 ad_set(struct adev *, const char *, ...);
int		 ad_limit(struct adev *);
ssize_t		 ad_read(struct adev *, void *, size_t);
#ifdef ADWRITE_NOCONST
ssize_t		 ad_write(struct adev *, void *, size_t);
#else
ssize_t		 ad_write(struct adev *, const void *, size_t);
#endif
